<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

//前台模块
Route::group(['domain' => env('HOME_DOMAIN'), 'namespace' => 'Home'], function () {

    //无需验证登录状态（登录不登录都可以访问）
    Route::get('/', 'HomeController@getIndex');

    //需验证登录状态(没有登录才可访问)
    Route::group(['middleware' => ['csrf', 'guest']], function () {
        Route::group(['prefix' => 'auth', 'namespace' => 'Auth'], function () {
            Route::controller('auth', 'AuthController');
        });
    });

    //需验证登录状态(登录才可访问)
    Route::group(['middleware' => ['csrf', 'auth']], function () {
        Route::get('/xin', 'HomeController@getIndexs');
    });

});


